build: Move the gtk-doc dep to the toplevel
authorMatthias Clasen <mclasen@redhat.com>
Fri, 4 Sep 2020 13:52:37 +0000 (09:52 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 4 Sep 2020 13:57:14 +0000 (09:57 -0400)
We want to include the gtk-doc subproject in release
tarballs, using --include-subprojects, but that only
works if we've actually built the subproject. And
enabling gtk-doc for dist builds is problematic -
it tends to break meson dist.

So declare the gtk-doc dependency independent of
-Dgtk_doc, and use --force-fallback-for for it.

docs/reference/meson.build
meson.build

index 905af97d000181377d351ea64e52cf05e093fed9..76525011ba750d35debfea5b53b1b259a3c44916 100644 (file)
@@ -3,12 +3,6 @@ if get_option('gtk_doc')
     error('Building the GTK documentation requires Meson 0.52.0')
   endif
 
-  # Use gtk-doc as a sub-project from the gtk-doc-for-gtk4 branch
-  # for the time being
-  dependency('gtk-doc', version: '>=1.99',
-    fallback: ['gtk-doc', 'dummy_dep'],
-    default_options: ['tests=false', 'yelp_manual=false'])
-
   glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
   glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
 
index 5ad8508fb3506d54aceb54990695e3bcf05b7510..019b608c2a238bae0f36f2c698ab065828629442 100644 (file)
@@ -382,6 +382,11 @@ graphene_dep   = dependency('graphene-gobject-1.0', version: graphene_req,
                             fallback: ['graphene', 'graphene_dep'])
 iso_codes_dep  = dependency('iso-codes', required: false)
 
+gtk_doc_dep    = dependency('gtk-doc', version: '>=1.99',
+                            fallback: ['gtk-doc', 'dummy_dep'],
+                            default_options: ['tests=false', 'yelp_manual=false'],
+                            required: get_option('gtk_doc'))
+
 fontconfig_dep = [] # only used in x11 backend
 
 if os_win32